using System;
using System.ComponentModel.DataAnnotations;
using WorkFlowCore.BusinessDemo.Web.Entities;

namespace WorkFlowCore.BusinessDemo.Web.Models
{
    public class WorkTaskStateInfoViewModel
    {
        public int Id { get; set; }
        public string EntityFullName { get; set; }
        public string EntityKeyValue { get; set; }
        public WorkTaskStatus WorkTaskStatus { get; set; }
        public DateTime UpdatedTime { get; set; }

        [Display(Name = "流程名称")]
        public string ProcessName { get; set; }
        
        public string StatusDisplay => WorkTaskStatus switch
        {
            WorkTaskStatus.Pending => "待处理",
            WorkTaskStatus.Processing => "处理中",
            WorkTaskStatus.Processed => "已完成",
            WorkTaskStatus.Canceled => "撤销", 
            WorkTaskStatus.Rejected => "已驳回",
            _ => string.Empty
        };
    }
}
